package com.awcall.iot.model;

import java.io.Serializable;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author wuhui
 * @since 2018-03-30
 */
@TableName("bd_user_project")
public class UserProject extends Model<UserProject> {

    private static final long serialVersionUID = 1L;

	private Integer id;
	@TableField("user_id")
	private Integer userId;
	@TableField("project_id")
	private Integer projectId;
	@TableField(value = "created_at", fill = FieldFill.INSERT)
	private Date createdAt;
	@TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
	private Date updatedAt;

	@TableField(exist = false)
	private String name;

	public String getName() {
		return name;
	}

	public UserProject setName(String name) {
		this.name = name;
		return this;
	}

	public Integer getId() {
		return id;
	}

	public UserProject setId(Integer id) {
		this.id = id;
		return this;
	}

	public Integer getUserId() {
		return userId;
	}

	public UserProject setUserId(Integer userId) {
		this.userId = userId;
		return this;
	}

	public Integer getProjectId() {
		return projectId;
	}

	public UserProject setProjectId(Integer projectId) {
		this.projectId = projectId;
		return this;
	}

	public Date getCreatedAt() {
		return createdAt;
	}

	public UserProject setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
		return this;
	}

	public Date getUpdatedAt() {
		return updatedAt;
	}

	public UserProject setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
		return this;
	}

	public static final String ID = "id";

	public static final String USER_ID = "user_id";

	public static final String PROJECT_ID = "project_id";

	public static final String CREATED_AT = "created_at";

	public static final String UPDATED_AT = "updated_at";

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "UserProject{" +
			", id=" + id +
			", userId=" + userId +
			", projectId=" + projectId +
			", createdAt=" + createdAt +
			", updatedAt=" + updatedAt +
			"}";
	}
}
